package com.danger.Presenter;

import android.content.Context;

import com.danger.Model.action.SettingModel;
import com.danger.Model.action.SettingModelImpl;
import com.danger.Model.listener.OnCommonListener;
import com.danger.View.CommonView;

/**
 * Created by danger on 2016/4/23.
 */
public class SettingPresenterImpl implements SettingPresenter{

    private Context context;
    private SettingModel model;
    private CommonView view;

    public SettingPresenterImpl(Context context,CommonView view){
        this.context = context;
        this.view = view;
        model = new SettingModelImpl(context);
    }

    @Override
    public void resetAsDefault() {
        model.recoverySetting(new OnCommonListener() {
            @Override
            public void onSuccess(String msg) {
                view.showSuccess(msg,null);
            }

            @Override
            public void onError(String error) {
                view.showError(error);
            }
        });
    }

    @Override
    public void checkUpdate() {

    }
}
